from flask import Flask
from flask_cors import CORS
server=Flask("app")

CORS(server, supports_credentials=True)

@server.route("/")
def index():
    return "hello flask!"

@server.route("/info")
def skdfhfjdia():
    # 读取文件
    file = open('info.json','r',encoding='utf-8')
    data = file.read()
    file.close()
    return data

server.run('0.0.0.0', port=8080)

